#pragma once
#include "instrument.h"
#include "SineWave.h"
#include "AR.h"
class CToneInstrument :
	public CInstrument
{
public:
	CToneInstrument(void);
	~CToneInstrument(void);

	virtual void Start();
    virtual bool Generate();

    void SetFreq(double aF) {mSinewave.SetFreq(aF);}
    void SetAmplitude(double aA) {mSinewave.SetAmplitude(aA);}
    void SetDuration(double aD) {mDuration = aD; mAr.SetDuration(aD);}

	void SetNote( CNote *aNote );

private:
    CSineWave   mSinewave;
    double mDuration;
    double mTime;
	CAR mAr;
};

